x86/msr: introduce struct msr_domain_policy
authorSergey Dyasli <sergey.dyasli@citrix.com>
Mon, 25 Sep 2017 08:53:00 +0000 (10:53 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 25 Sep 2017 08:53:00 +0000 (10:53 +0200)
commit4098b092e1902de9925342a527f8173cdb376426
treecfaf3cae888cf3181e320f91f202b65da24d2f2e
parent7ff9661b904a3af618dc2a2b8cdec46be6930308
x86/msr: introduce struct msr_domain_policy

The new structure contains information about guest's MSRs that are
shared between all domain's vCPUs. It starts with only 1 MSR:

    MSR_INTEL_PLATFORM_INFO

Which currently has only 1 usable bit: cpuid_faulting.

Add 2 global policy objects: hvm_max and pv_max that are inited during
boot up. It's always possible to emulate CPUID faulting for HVM guests
while for PV guests the H/W support is required.

Add init_domain_msr_policy() which sets initial MSR policy during
domain creation with a special case for Dom0.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/Makefile
xen/arch/x86/domain.c
xen/arch/x86/msr.c [new file with mode: 0644]
xen/arch/x86/setup.c
xen/include/asm-x86/domain.h
xen/include/asm-x86/msr.h